package de.argh.codebook.service;

import java.util.List;

import org.springframework.security.core.userdetails.UsernameNotFoundException;

import de.argh.codebook.model.Coder;

/**
 * The UserService provides all circumstances around an user.
 * 
 * @author Rose
 * 
 */
public interface CoderService {

  /**
   * Loading an user by its internal identifier.
   * 
   * @param Id
   * @return
   */
  Coder getCoderById(Long id);

  /**
   * Lists all Followers of a User. Lazyloading will be preferred instead of
   * loading all followers while instanciating the User.
   * 
   * @param id
   * @return
   */
  List<Coder> getFollower(Long id);

  /**
   * Loads the user with login credentials.
   * 
   * @param name
   * @return
   */
  Coder getCoderByPrincipalName(String name) throws UsernameNotFoundException;
}
